package com.rou.im.framework.boot.starter.builder;

import com.rou.im.framework.boot.starter.Builder;
import com.rou.im.framework.boot.starter.Configurer;
import com.rou.im.framework.core.processorstack.Processor;
import com.rou.im.framework.core.processorstack.ProcessorStack;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2020-05-05 16:42
 */
public interface ProcessorStackConfigureBuilder<H extends ProcessorStackConfigureBuilder<H>> extends Builder<ProcessorStack> {


    <C extends Configurer<H>> C getConfigurer(Class<C> clazz);

    <C extends Configurer<H>> C removeConfigurer(Class<C> clazz);

    ProcessorStackBuilder addProcessor(Processor processor);

    ProcessorStackBuilder addProcessorAfter(Processor processor, Class<Processor> afClass);

    ProcessorStackBuilder addProcessorBefore(Processor processor, Class<Processor> bfClass);

    ProcessorStackBuilder addProcessorAt(Processor processor, Class<Processor> atClass);

    ProcessorStackBuilder remove(Class<Processor> atClass);


}
